using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SMS.OnLine.BusinessLogicLayer;
using System.Collections.Generic;
using SMS.OnLine.Security;

/// <summary>
/// Summary description for DataAccess
/// </summary>
namespace SMS.OnLine.DataAccessLayer
{
    public abstract class SMSDataAccess
    {
        protected string ConnectionString
        {
            get
            {
                string connectionString = "";
                if (ConfigurationManager.ConnectionStrings["SMS_OnLine"] != null)
                {
                    connectionString = ConfigurationManager.ConnectionStrings["SMS_OnLine"].ConnectionString;
                }
                return connectionString;
            }
        }

        //Message
        public abstract MessageEntry GetMessageEntryById(string msgId);
        public abstract List<MessageEntry> GetTop10MessageEntries();
        public abstract List<MessageEntry> GetMessageByConditionEntries(string category, string senderDept, DateTime beginDate, DateTime endDate, string caption, string status);
        public abstract List<MessageCategoryEntry> GetMessageCategoryEntries();
        public abstract List<DepartmentEntry> GetMessageDepartmentEntries(string department);
        public abstract List<MessageStatusEntry> GetMessageStatusEntries();
        public abstract bool SaveMessage(bool isNew, MessageEntry message);

        //Security
        public abstract Passport Login(string userId, string password);

        //Inventory
         
        //Sales

    }

    public abstract class DataMartDataAccess
    {
        protected string ConnectionString
        {
            get
            {
                string connectionString = "";
                if (ConfigurationManager.ConnectionStrings["DataMart"] != null)
                {
                    connectionString = ConfigurationManager.ConnectionStrings["DataMart"].ConnectionString;
                }
                return connectionString;
            }
        }

        public abstract List<StoreEntry> GetAllStoreEntries();
        public abstract List<AreaEntry> GetAllAreaEntries();
        public abstract List<StoreEntry> GetAllStoreByAreaEntries(string area);
    }
}
